import React, { Component } from 'react'

export default class Video extends Component {
    
    render() {
        return (
            <div className="video-container">
                <video src={this.props.src} height="500" controls onClick={this.change}></video>
            </div>
        )
    }

    //事件的回调
    change = () => {
        //改变视频, 调用父级组件中 change 方法
        this.props.change();
    }
}
